﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ResourceCollectionDomain.Entity;

namespace ResourceCollectionDao
{
    public class GameDao
    {
        /// <summary>
        /// 保存游戏信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public static bool SaveToGameInfo(Game dto)
        {
            using (var db = new DBDataContext())
            {
                try
                {
                    db.Game.InsertOnSubmit(dto);
                    db.SubmitChanges();
                    return true;
                }
                catch (Exception ex)
                {
                    return false;
                    //名称重复不管
                }
               
            }

        }
    }
}
